const express = require('express');
//路由注册
const routes = express.Router();
const { loginUser, getUserinfo, Settled, Swipers, getSettledLists, Newdynamics, userDynamicsDetails, getSettledUserDetails,getUserDynamicsLists,OrderCreate,getOrderLists,editUserInfo,followUser,unfollowUser,getFollowingList,getFollowerList,isFollow,deletePost,editDynamics} = require('../controllers/Usercontrollers');

//用户登录
routes.post('/login', loginUser);
routes.get('/getUserinfo', getUserinfo);
routes.post('/apply', Settled);
routes.get('/swiperLists', Swipers);
routes.get('/getSettledLists', getSettledLists);
routes.post('/Newdynamics', Newdynamics);
routes.get('/UserDynamicsDetails', userDynamicsDetails);
routes.get('/getSettledUserDetails', getSettledUserDetails);
routes.get('/getUserDynamicsLists', getUserDynamicsLists);
routes.post('/OrderCreate', OrderCreate);
routes.get('/getOrderLists', getOrderLists);
routes.post('/editUserInfo', editUserInfo);
routes.post('/followUser', followUser);
routes.post('/unfollowUser', unfollowUser);
routes.get('/getFollowingList', getFollowingList);
routes.get('/getFollowerList', getFollowerList);
routes.get('/isFollow', isFollow);
routes.get('/deletePost', deletePost);
routes.post('/editDynamics', editDynamics);

// 导出前验证路由（调试用）
console.log('[路由注册成功！]');

module.exports = routes;